<!DOCTYPE html>
<html lang="en">

  <head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
  </head>
  <style>
    .box {
      /* height: 400px; */
      background-color: pink;
    }

    .div1 {
      width: 100px;
      height: 100px;
      background-color: purple;
      float: left;
    }

    .div2 {
      /* display: inline-block; */
      width: 200px;
      height: 200px;
      background-color: rgb(26, 128, 0);
      float: left;
    }
  </style>

  <body>
    <div class="box">
      <div class="div1">盒子1</div>
      <div class="div2">盒子2</div>
    </div>
  </body>

</html>